{* Smarty *}
{include file="file:../../../templates/header.tpl"}
<script language="javascript">
{literal}
function sendToTable(o){
	$order = o.name;
	$id = o.value;
	$.post("ajax/ajax_toDB.php",{choice_order:$order, choice_value:$id},showData);
}
function showData(data){
}
{/literal}
</script>
<body">
<div id="listing">
{$true_values}
{$false_values}
</div>
<form method="post" action="?option=test&task=check" id="test">
<table>
	<tr>
		<td width="400">
			<table>
			{section name=counter loop=$questions}
			{strip}
				<tr>
					<td>
					<table>
						<tr>
							<td>{$questions[counter][0]}</td>
							<td>{$questions[counter][1]}</td>
						</tr>
						{section name=c loop=$questions[counter][2]}
						{strip}
							<tr>
								<td><input type="radio" id="{$questions[counter][0]}" name="{$questions[counter][0]}" 
									value="{$questions[counter][2][c]->pol}" {if $orders[counter][c] eq 'checked'}checked='selected'{else} {/if}  onChange="sendToTable(this)">
								</td>
								<td style="color:{$c_colors[counter]}">{$questions[counter][2][c]->title}</td>
							</tr>
						{/strip}
						{/section}
					</table>
					</td>
				</tr>
			{/strip}
			{/section}
			<tr>
				<td><input type="submit" value="Submit"/></td>
			</tr>
			</table>
		</td>
	</tr>
</table>
</form>
</body>
{include file='file:../../../templates/footer.tpl'}